#include "Camera.h"

Camera::Camera() : x(0), y(0), z(0), boom(128), angleX(-45), angleY(45),
angleZ(0), hither(1), yonder(8192), fov(80) {

}

void Camera::ApplyPerspective() {
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(fov, width / height, hither, yonder);

    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    glTranslatef(0, 0, -boom);
    glRotatef(-angleX, 1, 0, 0);
    glRotatef(-angleY, 0, 1, 0);
    glRotatef(-angleZ, 0, 0, 1);
    glTranslatef(-x, -y, -z);
}